MSDS Thesis¶

Data Analysis in Python for olfactoneuroimaging data¶

Apoorv Saraogee MSDS 599 - Dr. Srinivasan

In [3]:
import pandas as pd
import sklearn
import numpy as np
import matplotlib.pyplot as plt
import os
import subprocess

import nibabel as nib
import nilearn.plotting as plotting
from nilearn.image import mean_img
import glob

from tensorflow import keras
import tensorflow as tf
from sklearn.model_selection import train_test_split
from sklearn.model_selection import cross_val_score
from sklearn.model_selection import cross_validate
from sklearn.model_selection import KFold

# Set FSL environment variables
os.environ['FSLDIR'] = '/Users/asaraog/fsl'
os.environ['FSLOUTPUTTYPE'] = 'NIFTI_GZ'
os.environ['PATH'] += os.pathsep + os.path.join(os.environ['FSLDIR'], 'bin')
# Define file paths and parameters
data_dir = 'ds002185-download'
2024-08-27 14:58:35.646671: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
In [12]:
#Example for EDA
subject_id = '01'
run_id = '01'
func_file = os.path.join(data_dir, f'sub-{subject_id}', f'func/sub-{subject_id}_task-odors_run-{run_id}_bold.nii.gz')
output_dir = 'preproc'
os.makedirs(output_dir, exist_ok=True)

#View image before preprocessing
img = nib.load(func_file)
data = img.get_fdata()
if data.ndim == 4:
    img = nib.Nifti1Image(data[:, :, :, data.shape[3] // 2], img.affine)
plotting.view_img(img, threshold=None, title='Raw')
/usr/local/lib/python3.11/site-packages/numpy/core/fromnumeric.py:758: UserWarning: Warning: 'partition' will ignore the 'mask' of the MaskedArray.
  a.partition(kth, axis=axis, kind=kind, order=order)
Out[12]:
In [11]:
# Step 1: Motion Correction with MCFLIRT
motion_corrected_file = os.path.join(output_dir, f'sub-{subject_id}_task-odors_run-{run_id}_bold_mcf.nii.gz')
mcflirt_cmd = f"mcflirt -in {func_file} -out {motion_corrected_file}"
subprocess.run(mcflirt_cmd, shell=True, check=True)
img = nib.load(motion_corrected_file)
data = img.get_fdata()
if data.ndim == 4:
    img = nib.Nifti1Image(data[:, :, :, data.shape[3] // 2], img.affine)
plotting.view_img(img, threshold=None, title='Motion Corrected')
/usr/local/lib/python3.11/site-packages/numpy/core/fromnumeric.py:758: UserWarning: Warning: 'partition' will ignore the 'mask' of the MaskedArray.
  a.partition(kth, axis=axis, kind=kind, order=order)
Out[11]:
In [ ]:
# Step 2: Extract a single volume from the 4D data for BET
extracted_volume_file = os.path.join(output_dir, f'sub-{subject_id}_task-odors_run-{run_id}_bold_extracted.nii.gz')
extract_volume_cmd = f"fslroi {motion_corrected_file} {extracted_volume_file} 0 1"
subprocess.run(extract_volume_cmd, shell=True, check=True)

# Step 3: Brain Extraction
bet_output_file = os.path.join(output_dir, f'sub-{subject_id}_task-odors_run-{run_id}_bold_brain.nii.gz')
bet_mask_file = os.path.join(output_dir, f'sub-{subject_id}_task-odors_run-{run_id}_bold_brain_mask.nii.gz')
bet_cmd = f"bet {extracted_volume_file} {bet_output_file} -m -g 0.65"
subprocess.run(bet_cmd, shell=True, check=True)

# Step 4: Apply brain mask to the full 4D fMRI data
masked_file = os.path.join(output_dir, f'sub-{subject_id}_task-odors_run-{run_id}_bold_masked.nii.gz')
apply_mask_cmd = f"fslmaths {motion_corrected_file} -mas {bet_mask_file} {masked_file}"
subprocess.run(apply_mask_cmd, shell=True, check=True)
img = nib.load(masked_file)
data = img.get_fdata()
if data.ndim == 4:
    img = nib.Nifti1Image(data[:, :, :, data.shape[3] // 2], img.affine)
plotting.view_img(img, threshold=None, title='After BET')
/usr/local/lib/python3.11/site-packages/numpy/core/fromnumeric.py:758: UserWarning: Warning: 'partition' will ignore the 'mask' of the MaskedArray.
  a.partition(kth, axis=axis, kind=kind, order=order)
/usr/local/lib/python3.11/site-packages/nilearn/plotting/html_document.py:102: UserWarning: It seems you have created more than 10 nilearn views. As each view uses dozens of megabytes of RAM, you might want to delete some of them.
  warnings.warn(
Out[ ]:
In [ ]:
# Step 5: Spatial Smoothing
smoothed_file = os.path.join(output_dir, f'sub-{subject_id}_task-odors_run-{run_id}_bold_smooth.nii.gz')
smooth_cmd = f"fslmaths {masked_file} -s 2.548 {smoothed_file}"
subprocess.run(smooth_cmd, shell=True, check=True)
img = nib.load(smoothed_file)
data = img.get_fdata()
if data.ndim == 4:
    img = nib.Nifti1Image(data[:, :, :, data.shape[3] // 2], img.affine)
plotting.view_img(img, threshold=None, title='Smoothed')
/usr/local/lib/python3.11/site-packages/numpy/core/fromnumeric.py:758: UserWarning: Warning: 'partition' will ignore the 'mask' of the MaskedArray.
  a.partition(kth, axis=axis, kind=kind, order=order)
/usr/local/lib/python3.11/site-packages/nilearn/plotting/html_document.py:102: UserWarning: It seems you have created more than 10 nilearn views. As each view uses dozens of megabytes of RAM, you might want to delete some of them.
  warnings.warn(
Out[ ]:
In [ ]:
# Step 6: High-Pass Temporal Filtering
highpassed_file = os.path.join(output_dir, f'sub-{subject_id}_task-odors_run-{run_id}_bold_highpass.nii.gz')
highpass_cmd = f"fslmaths {smoothed_file} -bptf {125 / 2.3548} -1 {highpassed_file}"
subprocess.run(highpass_cmd, shell=True, check=True)
img = nib.load(highpassed_file)
data = img.get_fdata()
if data.ndim == 4:
    img = nib.Nifti1Image(data[:, :, :, data.shape[3] // 2], img.affine)
plotting.view_img(img, threshold=None, title='High-Temporal Pass')
/usr/local/lib/python3.11/site-packages/numpy/core/fromnumeric.py:758: UserWarning: Warning: 'partition' will ignore the 'mask' of the MaskedArray.
  a.partition(kth, axis=axis, kind=kind, order=order)
/usr/local/lib/python3.11/site-packages/nilearn/plotting/html_document.py:102: UserWarning: It seems you have created more than 10 nilearn views. As each view uses dozens of megabytes of RAM, you might want to delete some of them.
  warnings.warn(
Out[ ]:
In [ ]:
# Step 7: Compute Mean Image for Nonlinear Registration to MNI Template Space
mean_image_file = os.path.join(output_dir, f'sub-{subject_id}_task-odors_run-{run_id}_bold_mean.nii.gz')
mean_cmd = f"fslmaths {highpassed_file} -Tmean {mean_image_file}"
subprocess.run(mean_cmd, shell=True, check=True)

# Step 8: Resample MNI Template to Match Data FOV
mni_template = '/Users/asaraog/fsl/data/standard/MNI152_T1_2mm_brain.nii.gz'
resampled_template_file = os.path.join(output_dir, f'mni_template_resampled.nii.gz')
resample_cmd = f"flirt -in {mni_template} -ref {mean_image_file} -out {resampled_template_file} -applyisoxfm 2.0"
subprocess.run(resample_cmd, shell=True, check=True)

# Step 9: Nonlinear Registration to MNI Template Space
mni_registered_file = os.path.join(output_dir, f'sub-{subject_id}_task-odors_run-{run_id}_bold_mni.nii.gz')
nonlinear_registration_cmd = f"fnirt --in={mean_image_file} --ref={resampled_template_file} --iout={mni_registered_file} --fout={output_dir}/warp_field --jout={output_dir}/jacobian"
subprocess.run(nonlinear_registration_cmd, shell=True, check=True)

# Step 10: Apply the MNI Registration Transform to All Time Points
mni_registered_all_timepoints_file = os.path.join(output_dir, f'sub-{subject_id}_task-odors_run-{run_id}_bold_preprocessed.nii.gz')
apply_transform_cmd = f"applywarp --ref={resampled_template_file} --in={highpassed_file} --warp={output_dir}/warp_field --out={mni_registered_all_timepoints_file}"
subprocess.run(apply_transform_cmd, shell=True, check=True)
img = nib.load(mni_registered_all_timepoints_file)
data = img.get_fdata()
if data.ndim == 4:
    img = nib.Nifti1Image(data[:, :, :, data.shape[3] // 2], img.affine)
plotting.view_img(img, threshold=None, title='MNI Registered All Timepoints')
/usr/local/lib/python3.11/site-packages/numpy/core/fromnumeric.py:758: UserWarning: Warning: 'partition' will ignore the 'mask' of the MaskedArray.
  a.partition(kth, axis=axis, kind=kind, order=order)
/usr/local/lib/python3.11/site-packages/nilearn/plotting/html_document.py:102: UserWarning: It seems you have created more than 10 nilearn views. As each view uses dozens of megabytes of RAM, you might want to delete some of them.
  warnings.warn(
Out[ ]:
In [ ]:
import os
import subprocess

# Define base directories
data_dir = 'ds002185-download'  # Input and output directory

# Get a list of all subject IDs
subject_ids = [d for d in os.listdir(data_dir) if d.startswith('sub-')]
for subject_id in subject_ids:
    if subject_id == 'sub-21':
        print(f"Skipping {subject_id} due to missing functional files.")
        continue
    
    subject_dir = os.path.join(data_dir, subject_id, 'func')
    if not os.path.exists(subject_dir):
        print(f"Skipping {subject_id} due to missing 'func' directory.")
        continue
    
    func_files = [f for f in os.listdir(subject_dir) if f.endswith('_bold.nii.gz')]
    
    for func_file in func_files:
        # Extract run_id from the file name (assuming format sub-01_task-odors_run-01_bold.nii.gz)
        run_id = func_file.split('_')[2].split('-')[1]  # Extract '01' or '02'
        
        if subject_id == 'sub-22' and run_id == '01':
            print(f"Skipping {subject_id} run-{run_id} due to corrupt file.")
            continue
        
        func_file_path = os.path.join(subject_dir, func_file)
        output_dir = subject_dir  # Output in the same place as input

        os.makedirs(output_dir, exist_ok=True)

        # Step 1: Motion Correction
        motion_corrected_file = os.path.join(output_dir, f'{subject_id}_task-odors_run-{run_id}_bold_mcf.nii.gz')
        mcflirt_cmd = f"mcflirt -in {func_file_path} -out {motion_corrected_file}"
        subprocess.run(mcflirt_cmd, shell=True, check=True)

        # Step 2: Extract a single volume from the 4D data for BET
        extracted_volume_file = os.path.join(output_dir, f'{subject_id}_task-odors_run-{run_id}_bold_extracted.nii.gz')
        extract_volume_cmd = f"fslroi {motion_corrected_file} {extracted_volume_file} 0 1"
        subprocess.run(extract_volume_cmd, shell=True, check=True)

        # Step 3: Brain Extraction
        bet_output_file = os.path.join(output_dir, f'{subject_id}_task-odors_run-{run_id}_bold_brain.nii.gz')
        bet_mask_file = os.path.join(output_dir, f'{subject_id}_task-odors_run-{run_id}_bold_brain_mask.nii.gz')
        bet_cmd = f"bet {extracted_volume_file} {bet_output_file} -m -g 0.65"
        subprocess.run(bet_cmd, shell=True, check=True)

        # Step 4: Apply brain mask to the full 4D fMRI data
        masked_file = os.path.join(output_dir, f'{subject_id}_task-odors_run-{run_id}_bold_masked.nii.gz')
        apply_mask_cmd = f"fslmaths {motion_corrected_file} -mas {bet_mask_file} {masked_file}"
        subprocess.run(apply_mask_cmd, shell=True, check=True)
  
        # Step 5: Spatial Smoothing
        smoothed_file = os.path.join(output_dir, f'{subject_id}_task-odors_run-{run_id}_bold_smooth.nii.gz')
        smooth_cmd = f"fslmaths {masked_file} -s 2.548 {smoothed_file}"
        subprocess.run(smooth_cmd, shell=True, check=True)

        # Step 6: High-Pass Temporal Filtering
        highpassed_file = os.path.join(output_dir, f'{subject_id}_task-odors_run-{run_id}_bold_highpass.nii.gz')
        highpass_cmd = f"fslmaths {smoothed_file} -bptf {125 / 2.3548} -1 {highpassed_file}"
        subprocess.run(highpass_cmd, shell=True, check=True)

        # Step 7: Compute Mean Image for Nonlinear Registration to MNI Template Space
        mean_image_file = os.path.join(output_dir, f'{subject_id}_task-odors_run-{run_id}_bold_mean.nii.gz')
        mean_cmd = f"fslmaths {highpassed_file} -Tmean {mean_image_file}"
        subprocess.run(mean_cmd, shell=True, check=True)

        # Step 8: Resample MNI Template to Match Data FOV
        mni_template = '/Users/asaraog/fsl/data/standard/MNI152_T1_2mm_brain.nii.gz'
        resampled_template_file = os.path.join(output_dir, f'mni_template_resampled.nii.gz')
        resample_cmd = f"flirt -in {mni_template} -ref {mean_image_file} -out {resampled_template_file} -applyisoxfm 2.0"
        subprocess.run(resample_cmd, shell=True, check=True)

        # Step 9: Nonlinear Registration to MNI Template Space
        mni_registered_file = os.path.join(output_dir, f'{subject_id}_task-odors_run-{run_id}_bold_mni.nii.gz')
        nonlinear_registration_cmd = f"fnirt --in={mean_image_file} --ref={resampled_template_file} --iout={mni_registered_file} --fout={output_dir}/warp_field --jout={output_dir}/jacobian"
        subprocess.run(nonlinear_registration_cmd, shell=True, check=True)

        # Step 10: Apply the MNI Registration Transform to All Time Points
        mni_registered_all_timepoints_file = os.path.join(output_dir, f'{subject_id}_task-odors_run-{run_id}_bold_preprocessed.nii.gz')
        apply_transform_cmd = f"applywarp --ref={resampled_template_file} --in={highpassed_file} --warp={output_dir}/warp_field --out={mni_registered_all_timepoints_file}"
        subprocess.run(apply_transform_cmd, shell=True, check=True)

        # Clean up intermediate files
        intermediate_files = [
            motion_corrected_file,
            extracted_volume_file,
            bet_output_file,
            bet_mask_file,
            masked_file,
            smoothed_file,
            highpassed_file,
            mean_image_file,
            resampled_template_file,
            mni_registered_file,
            os.path.join(output_dir, f'{subject_id}_task-odors_run-{run_id}_bold_mean_to_mni_template_resampled.log'),
            os.path.join(output_dir, f'{subject_id}_task-odors_run-{run_id}_bold_mean_warpcoef.nii.gz'),
            os.path.join(output_dir, 'warp_field.nii.gz'),
            os.path.join(output_dir, 'jacobian.nii.gz')
        ]
        for file in intermediate_files:
            if os.path.isfile(file):
                os.remove(file)

        print(f"Preprocessing complete for {subject_id}_run-{run_id}! Intermediate files deleted.")
Preprocessing complete for sub-13_run-01! Intermediate files deleted.
Preprocessing complete for sub-13_run-02! Intermediate files deleted.
Preprocessing complete for sub-14_run-01! Intermediate files deleted.
Preprocessing complete for sub-14_run-02! Intermediate files deleted.
Skipping sub-22 run-01 due to corrupt file.
Preprocessing complete for sub-22_run-02! Intermediate files deleted.
Preprocessing complete for sub-15_run-02! Intermediate files deleted.
Preprocessing complete for sub-15_run-01! Intermediate files deleted.
Preprocessing complete for sub-12_run-02! Intermediate files deleted.
Preprocessing complete for sub-12_run-01! Intermediate files deleted.
Preprocessing complete for sub-08_run-01! Intermediate files deleted.
Preprocessing complete for sub-08_run-02! Intermediate files deleted.
Preprocessing complete for sub-01_run-02! Intermediate files deleted.
Preprocessing complete for sub-01_run-01! Intermediate files deleted.
Preprocessing complete for sub-06_run-02! Intermediate files deleted.
Preprocessing complete for sub-06_run-01! Intermediate files deleted.
Preprocessing complete for sub-07_run-01! Intermediate files deleted.
Preprocessing complete for sub-07_run-02! Intermediate files deleted.
Preprocessing complete for sub-09_run-02! Intermediate files deleted.
Preprocessing complete for sub-09_run-01! Intermediate files deleted.
Preprocessing complete for sub-17_run-02! Intermediate files deleted.
Preprocessing complete for sub-17_run-01! Intermediate files deleted.
Preprocessing complete for sub-10_run-02! Intermediate files deleted.
Preprocessing complete for sub-10_run-01! Intermediate files deleted.
Preprocessing complete for sub-19_run-01! Intermediate files deleted.
Preprocessing complete for sub-19_run-02! Intermediate files deleted.
Skipping sub-21 due to missing functional files.
Preprocessing complete for sub-20_run-01! Intermediate files deleted.
Preprocessing complete for sub-20_run-02! Intermediate files deleted.
Preprocessing complete for sub-18_run-02! Intermediate files deleted.
Preprocessing complete for sub-18_run-01! Intermediate files deleted.
Preprocessing complete for sub-11_run-01! Intermediate files deleted.
Preprocessing complete for sub-11_run-02! Intermediate files deleted.
Preprocessing complete for sub-16_run-01! Intermediate files deleted.
Preprocessing complete for sub-16_run-02! Intermediate files deleted.
Preprocessing complete for sub-05_run-01! Intermediate files deleted.
Preprocessing complete for sub-05_run-02! Intermediate files deleted.
Preprocessing complete for sub-02_run-01! Intermediate files deleted.
Preprocessing complete for sub-02_run-02! Intermediate files deleted.
Preprocessing complete for sub-03_run-02! Intermediate files deleted.
Preprocessing complete for sub-03_run-01! Intermediate files deleted.
Preprocessing complete for sub-04_run-02! Intermediate files deleted.
Preprocessing complete for sub-04_run-01! Intermediate files deleted.
In [5]:
# Define positive and negative response conditions
positive_conditions = ['orange', 'banana']
negative_conditions = ['isovaleric', 'bacon', 'asafetida', 'smelly-cheese']

# TR value
tr = 1.5

# Function to process events, filter by condition, and extract 4D data for 16 DICOM volumes after onset

def process_and_extract_data(file_path, nifti_file, condition_filter):
    # Check if the NIfTI file exists
    if not os.path.exists(nifti_file):
        raise FileNotFoundError(f"NIfTI file not found: {nifti_file}")
    
    # Extract subject and run from the file path
    parts = file_path.split('/')
    subject = parts[1]
    filename = os.path.basename(file_path)  # Get the file name from the path
    run_modality = filename.split('_')[2].replace('_events.tsv', '')  # Extract run_modality as 'run-01' or 'run-02'
    
    # Ensure run_modality is in the format 'run-01' or 'run-02'
    if run_modality not in ['run-01', 'run-02']:
        raise ValueError(f"Unexpected run_modality: {run_modality}")

    # Load the events.tsv file into a DataFrame
    events_df = pd.read_csv(file_path, delimiter='\t')
    
    # Check for 'trial_type' or 'condition' and rename to 'smell'
    if 'trial_type' in events_df.columns:
        events_df.rename(columns={'trial_type': 'smell'}, inplace=True)
    elif 'condition' in events_df.columns:
        events_df.rename(columns={'condition': 'smell'}, inplace=True)
    else:
        print(f"'trial_type' or 'condition' column not found in file: {file_path}. Adding 'smell' column with default value.")
        events_df['smell'] = 'unknown'  # Add 'smell' column with a default value if neither column is found

    # Convert onset to DICOM volume
    events_df['onset'] = events_df['onset'].astype(float)
    events_df['dicom_volume'] = (events_df['onset'] / tr).round().astype(int)

    # Filter based on condition
    filtered_df = events_df[events_df['smell'].isin(condition_filter)].copy()

    if filtered_df.empty:
        return pd.DataFrame()  # Return empty DataFrame if no valid events

    # Load the NIfTI file for the run
    img = nib.load(nifti_file)
    img_data = img.get_fdata()
    
    # Debugging: Check the shape of the NIfTI data
    print(f"Loaded NIfTI file: {nifti_file}, Shape: {img_data.shape}")
    
    # Get the shape of the data
    _, _, _, num_volumes = img_data.shape
    
    # Create a list to store the data for each event
    extracted_data = []

    for _, row in filtered_df.iterrows():
        dicom_start = row['dicom_volume']
        
        # Ensure we don't exceed the number of volumes in the run
        dicom_end = dicom_start + 16
        
        # Check if there are enough volumes to extract
        if dicom_start >= 0 and dicom_end <= num_volumes:
            # Extract the 4D data for the 16 volumes starting from the onset
            data_slice = img_data[:, :, :, dicom_start:dicom_end]
            
            # Print the shape of the extracted data
            print(f"Extracted data shape for event with onset {row['onset']}: {data_slice.shape}")
            
            # Only add to list if data_slice has at least 16 volumes
            if data_slice.shape[-1] >= 16:
                extracted_data.append({
                    'subject': subject,
                    'run_modality': run_modality,
                    'onset': row['onset'],
                    'dicom_start': dicom_start,
                    'dicom_end': dicom_end,
                    'smell': row['smell'],  # Now using 'smell'
                    'data': data_slice
                })
            else:
                print(f"Skipping event with fewer than 16 volumes: Start = {dicom_start}, End = {dicom_end}, Total Volumes = {num_volumes}")
        else:
            print(f"Skipping event with invalid DICOM volume range: Start = {dicom_start}, End = {dicom_end}, Total Volumes = {num_volumes}")
    
    # Convert the list of dictionaries to a DataFrame
    return pd.DataFrame(extracted_data)

# Process all subjects and runs for positive and negative responses
event_files = glob.glob('ds002185-download/sub-*/func/*_events.tsv')
positive_dfs = []
negative_dfs = []

for file_path in event_files:
    # Assume the corresponding NIfTI file is named similarly to the events file
    nifti_file = file_path.replace('_events.tsv', '_bold_preprocessed.nii.gz')
    
    try:
        positive_df = process_and_extract_data(file_path, nifti_file, condition_filter=positive_conditions)
        negative_df = process_and_extract_data(file_path, nifti_file, condition_filter=negative_conditions)
        
        # Append to the respective list if the DataFrame is not empty
        if not positive_df.empty:
            positive_dfs.append(positive_df)
        if not negative_df.empty:
            negative_dfs.append(negative_df)
    except Exception as e:
        print(f"Error processing file {file_path}: {e}")

# Combine all subjects into single DataFrames for positive and negative responses
if positive_dfs:
    positive_combined_df = pd.concat(positive_dfs, ignore_index=True)
else:
    positive_combined_df = pd.DataFrame()

if negative_dfs:
    negative_combined_df = pd.concat(negative_dfs, ignore_index=True)
else:
    negative_combined_df = pd.DataFrame()

# Print total number of events
print(f"Total number of positive events: {len(positive_combined_df)}")
print(f"Total number of negative events: {len(negative_combined_df)}")
Loaded NIfTI file: ds002185-download/sub-13/func/sub-13_task-odors_run-02_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 405)
Extracted data shape for event with onset 4.2: (110, 104, 27, 16)
Extracted data shape for event with onset 153.0: (110, 104, 27, 16)
Extracted data shape for event with onset 269.7: (110, 104, 27, 16)
Extracted data shape for event with onset 383.7: (110, 104, 27, 16)
Extracted data shape for event with onset 507.5: (110, 104, 27, 16)
Extracted data shape for event with onset 33.4: (110, 104, 27, 16)
Extracted data shape for event with onset 211.3: (110, 104, 27, 16)
Extracted data shape for event with onset 298.3: (110, 104, 27, 16)
Extracted data shape for event with onset 415.2: (110, 104, 27, 16)
Extracted data shape for event with onset 476.8: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-13/func/sub-13_task-odors_run-02_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 405)
Extracted data shape for event with onset 94.7: (110, 104, 27, 16)
Extracted data shape for event with onset 181.7: (110, 104, 27, 16)
Extracted data shape for event with onset 241.7: (110, 104, 27, 16)
Extracted data shape for event with onset 446.3: (110, 104, 27, 16)
Extracted data shape for event with onset 568.4: (110, 104, 27, 16)
Extracted data shape for event with onset 65.0: (110, 104, 27, 16)
Extracted data shape for event with onset 126.3: (110, 104, 27, 16)
Extracted data shape for event with onset 326.6: (110, 104, 27, 16)
Extracted data shape for event with onset 356.4: (110, 104, 27, 16)
Extracted data shape for event with onset 534.7: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-13/func/sub-13_task-odors_run-01_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 414)
Extracted data shape for event with onset 91.6: (110, 104, 27, 16)
Extracted data shape for event with onset 148.4: (110, 104, 27, 16)
Extracted data shape for event with onset 299.9: (110, 104, 27, 16)
Extracted data shape for event with onset 418.8: (110, 104, 27, 16)
Extracted data shape for event with onset 538.7: (110, 104, 27, 16)
Extracted data shape for event with onset 32.1: (110, 104, 27, 16)
Extracted data shape for event with onset 207.8: (110, 104, 27, 16)
Extracted data shape for event with onset 240.5: (110, 104, 27, 16)
Extracted data shape for event with onset 360.6: (110, 104, 27, 16)
Extracted data shape for event with onset 479.9: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-13/func/sub-13_task-odors_run-01_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 414)
Extracted data shape for event with onset 3.0: (110, 104, 27, 16)
Extracted data shape for event with onset 178.8: (110, 104, 27, 16)
Extracted data shape for event with onset 272.0: (110, 104, 27, 16)
Extracted data shape for event with onset 450.6: (110, 104, 27, 16)
Extracted data shape for event with onset 510.6: (110, 104, 27, 16)
Extracted data shape for event with onset 64.4: (110, 104, 27, 16)
Extracted data shape for event with onset 121.4: (110, 104, 27, 16)
Extracted data shape for event with onset 330.1: (110, 104, 27, 16)
Extracted data shape for event with onset 391.5: (110, 104, 27, 16)
Extracted data shape for event with onset 569.8: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-14/func/sub-14_task-odors_run-01_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 440)
Extracted data shape for event with onset 10.4: (110, 104, 27, 16)
Extracted data shape for event with onset 179.7: (110, 104, 27, 16)
Extracted data shape for event with onset 267.4: (110, 104, 27, 16)
Extracted data shape for event with onset 455.0: (110, 104, 27, 16)
Extracted data shape for event with onset 482.0: (110, 104, 27, 16)
Extracted data shape for event with onset 91.6: (110, 104, 27, 16)
Extracted data shape for event with onset 209.6: (110, 104, 27, 16)
Extracted data shape for event with onset 327.6: (110, 104, 27, 16)
Extracted data shape for event with onset 359.6: (110, 104, 27, 16)
Extracted data shape for event with onset 544.0: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-14/func/sub-14_task-odors_run-01_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 440)
Extracted data shape for event with onset 38.8: (110, 104, 27, 16)
Extracted data shape for event with onset 147.3: (110, 104, 27, 16)
Extracted data shape for event with onset 237.8: (110, 104, 27, 16)
Extracted data shape for event with onset 426.7: (110, 104, 27, 16)
Extracted data shape for event with onset 573.8: (110, 104, 27, 16)
Extracted data shape for event with onset 64.6: (110, 104, 27, 16)
Extracted data shape for event with onset 120.4: (110, 104, 27, 16)
Extracted data shape for event with onset 297.9: (110, 104, 27, 16)
Extracted data shape for event with onset 393.0: (110, 104, 27, 16)
Extracted data shape for event with onset 514.9: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-14/func/sub-14_task-odors_run-02_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 440)
Extracted data shape for event with onset 65.8: (110, 104, 27, 16)
Extracted data shape for event with onset 220.9: (110, 104, 27, 16)
Extracted data shape for event with onset 315.4: (110, 104, 27, 16)
Extracted data shape for event with onset 464.4: (110, 104, 27, 16)
Extracted data shape for event with onset 526.3: (110, 104, 27, 16)
Extracted data shape for event with onset 6.9: (110, 104, 27, 16)
Extracted data shape for event with onset 98.4: (110, 104, 27, 16)
Extracted data shape for event with onset 165.1: (110, 104, 27, 16)
Extracted data shape for event with onset 373.8: (110, 104, 27, 16)
Extracted data shape for event with onset 496.0: (110, 104, 27, 16)
Extracted data shape for event with onset 591.7: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-14/func/sub-14_task-odors_run-02_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 440)
Extracted data shape for event with onset 38.5: (110, 104, 27, 16)
Extracted data shape for event with onset 191.0: (110, 104, 27, 16)
Extracted data shape for event with onset 346.5: (110, 104, 27, 16)
Extracted data shape for event with onset 405.4: (110, 104, 27, 16)
Extracted data shape for event with onset 622.6: (110, 104, 27, 16)
Extracted data shape for event with onset 132.7: (110, 104, 27, 16)
Extracted data shape for event with onset 254.9: (110, 104, 27, 16)
Extracted data shape for event with onset 283.9: (110, 104, 27, 16)
Extracted data shape for event with onset 434.1: (110, 104, 27, 16)
Extracted data shape for event with onset 559.6: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-22/func/sub-22_task-odors_run-02_bold_preprocessed.nii.gz, Shape: (110, 104, 26, 440)
Extracted data shape for event with onset 90.4: (110, 104, 26, 16)
Extracted data shape for event with onset 265.7: (110, 104, 26, 16)
Extracted data shape for event with onset 476.9: (110, 104, 26, 16)
Extracted data shape for event with onset 9.2: (110, 104, 26, 16)
Extracted data shape for event with onset 44.2: (110, 104, 26, 16)
Extracted data shape for event with onset 345.2: (110, 104, 26, 16)
Extracted data shape for event with onset 520.5: (110, 104, 26, 16)
Extracted data shape for event with onset 608.7: (110, 104, 26, 16)
Loaded NIfTI file: ds002185-download/sub-22/func/sub-22_task-odors_run-02_bold_preprocessed.nii.gz, Shape: (110, 104, 26, 440)
Extracted data shape for event with onset 134.1: (110, 104, 26, 16)
Extracted data shape for event with onset 307.2: (110, 104, 26, 16)
Extracted data shape for event with onset 387.6: (110, 104, 26, 16)
Extracted data shape for event with onset 560.9: (110, 104, 26, 16)
Extracted data shape for event with onset 176.1: (110, 104, 26, 16)
Extracted data shape for event with onset 220.7: (110, 104, 26, 16)
Extracted data shape for event with onset 433.5: (110, 104, 26, 16)
Skipping event with invalid DICOM volume range: Start = 433, End = 449, Total Volumes = 440
Error processing file ds002185-download/sub-22/func/sub-22_task-odors_run-01_events.tsv: NIfTI file not found: ds002185-download/sub-22/func/sub-22_task-odors_run-01_bold_preprocessed.nii.gz
Loaded NIfTI file: ds002185-download/sub-15/func/sub-15_task-odors_run-02_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 440)
Extracted data shape for event with onset 71.7: (110, 104, 27, 16)
Extracted data shape for event with onset 218.3: (110, 104, 27, 16)
Extracted data shape for event with onset 284.1: (110, 104, 27, 16)
Extracted data shape for event with onset 403.0: (110, 104, 27, 16)
Extracted data shape for event with onset 495.0: (110, 104, 27, 16)
Extracted data shape for event with onset 98.1: (110, 104, 27, 16)
Extracted data shape for event with onset 188.3: (110, 104, 27, 16)
Extracted data shape for event with onset 312.5: (110, 104, 27, 16)
Extracted data shape for event with onset 437.8: (110, 104, 27, 16)
Extracted data shape for event with onset 577.8: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-15/func/sub-15_task-odors_run-02_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 440)
Extracted data shape for event with onset 16.0: (110, 104, 27, 16)
Extracted data shape for event with onset 157.3: (110, 104, 27, 16)
Extracted data shape for event with onset 340.1: (110, 104, 27, 16)
Extracted data shape for event with onset 462.2: (110, 104, 27, 16)
Extracted data shape for event with onset 520.8: (110, 104, 27, 16)
Extracted data shape for event with onset 43.4: (110, 104, 27, 16)
Extracted data shape for event with onset 128.5: (110, 104, 27, 16)
Extracted data shape for event with onset 252.7: (110, 104, 27, 16)
Extracted data shape for event with onset 374.3: (110, 104, 27, 16)
Extracted data shape for event with onset 550.5: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-15/func/sub-15_task-odors_run-01_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 434)
Extracted data shape for event with onset 98.5: (110, 104, 27, 16)
Extracted data shape for event with onset 242.8: (110, 104, 27, 16)
Extracted data shape for event with onset 411.0: (110, 104, 27, 16)
Extracted data shape for event with onset 528.2: (110, 104, 27, 16)
Extracted data shape for event with onset 67.6: (110, 104, 27, 16)
Extracted data shape for event with onset 158.5: (110, 104, 27, 16)
Extracted data shape for event with onset 217.4: (110, 104, 27, 16)
Extracted data shape for event with onset 379.0: (110, 104, 27, 16)
Extracted data shape for event with onset 443.0: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-15/func/sub-15_task-odors_run-01_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 434)
Extracted data shape for event with onset 37.2: (110, 104, 27, 16)
Extracted data shape for event with onset 189.1: (110, 104, 27, 16)
Extracted data shape for event with onset 299.1: (110, 104, 27, 16)
Extracted data shape for event with onset 328.7: (110, 104, 27, 16)
Extracted data shape for event with onset 469.9: (110, 104, 27, 16)
Extracted data shape for event with onset 7.9: (110, 104, 27, 16)
Extracted data shape for event with onset 127.9: (110, 104, 27, 16)
Extracted data shape for event with onset 272.6: (110, 104, 27, 16)
Extracted data shape for event with onset 353.6: (110, 104, 27, 16)
Extracted data shape for event with onset 502.3: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-12/func/sub-12_task-odors_run-01_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 460)
Extracted data shape for event with onset 86.8: (110, 104, 27, 16)
Extracted data shape for event with onset 206.9: (110, 104, 27, 16)
Extracted data shape for event with onset 358.2: (110, 104, 27, 16)
Extracted data shape for event with onset 476.5: (110, 104, 27, 16)
Extracted data shape for event with onset 592.6: (110, 104, 27, 16)
Extracted data shape for event with onset 650.4: (110, 104, 27, 16)
Extracted data shape for event with onset 59.0: (110, 104, 27, 16)
Extracted data shape for event with onset 236.5: (110, 104, 27, 16)
Extracted data shape for event with onset 325.6: (110, 104, 27, 16)
Extracted data shape for event with onset 446.7: (110, 104, 27, 16)
Extracted data shape for event with onset 537.1: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-12/func/sub-12_task-odors_run-01_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 460)
Extracted data shape for event with onset 118.8: (110, 104, 27, 16)
Extracted data shape for event with onset 149.9: (110, 104, 27, 16)
Extracted data shape for event with onset 298.1: (110, 104, 27, 16)
Extracted data shape for event with onset 418.7: (110, 104, 27, 16)
Extracted data shape for event with onset 506.2: (110, 104, 27, 16)
Extracted data shape for event with onset 27.5: (110, 104, 27, 16)
Extracted data shape for event with onset 179.4: (110, 104, 27, 16)
Extracted data shape for event with onset 267.3: (110, 104, 27, 16)
Extracted data shape for event with onset 392.2: (110, 104, 27, 16)
Extracted data shape for event with onset 565.3: (110, 104, 27, 16)
Extracted data shape for event with onset 619.1: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-12/func/sub-12_task-odors_run-02_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 460)
Extracted data shape for event with onset 75.2: (110, 104, 27, 16)
Extracted data shape for event with onset 138.8: (110, 104, 27, 16)
Extracted data shape for event with onset 254.8: (110, 104, 27, 16)
Extracted data shape for event with onset 435.9: (110, 104, 27, 16)
Extracted data shape for event with onset 497.9: (110, 104, 27, 16)
Extracted data shape for event with onset 18.8: (110, 104, 27, 16)
Extracted data shape for event with onset 224.9: (110, 104, 27, 16)
Extracted data shape for event with onset 342.7: (110, 104, 27, 16)
Extracted data shape for event with onset 399.5: (110, 104, 27, 16)
Extracted data shape for event with onset 529.7: (110, 104, 27, 16)
Extracted data shape for event with onset 617.7: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-12/func/sub-12_task-odors_run-02_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 460)
Extracted data shape for event with onset 108.3: (110, 104, 27, 16)
Extracted data shape for event with onset 167.7: (110, 104, 27, 16)
Extracted data shape for event with onset 284.9: (110, 104, 27, 16)
Extracted data shape for event with onset 463.9: (110, 104, 27, 16)
Extracted data shape for event with onset 558.2: (110, 104, 27, 16)
Extracted data shape for event with onset 46.5: (110, 104, 27, 16)
Extracted data shape for event with onset 197.3: (110, 104, 27, 16)
Extracted data shape for event with onset 314.2: (110, 104, 27, 16)
Extracted data shape for event with onset 371.7: (110, 104, 27, 16)
Extracted data shape for event with onset 587.4: (110, 104, 27, 16)
Extracted data shape for event with onset 650.5: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-08/func/sub-08_task-odors_run-02_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 440)
Extracted data shape for event with onset 64.9: (110, 104, 27, 16)
Extracted data shape for event with onset 182.3: (110, 104, 27, 16)
Extracted data shape for event with onset 328.6: (110, 104, 27, 16)
Extracted data shape for event with onset 442.1: (110, 104, 27, 16)
Extracted data shape for event with onset 558.0: (110, 104, 27, 16)
Extracted data shape for event with onset 3.1: (110, 104, 27, 16)
Extracted data shape for event with onset 122.0: (110, 104, 27, 16)
Extracted data shape for event with onset 211.4: (110, 104, 27, 16)
Extracted data shape for event with onset 357.7: (110, 104, 27, 16)
Extracted data shape for event with onset 467.5: (110, 104, 27, 16)
Extracted data shape for event with onset 530.0: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-08/func/sub-08_task-odors_run-02_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 440)
Extracted data shape for event with onset 34.7: (110, 104, 27, 16)
Extracted data shape for event with onset 153.1: (110, 104, 27, 16)
Extracted data shape for event with onset 273.0: (110, 104, 27, 16)
Extracted data shape for event with onset 413.9: (110, 104, 27, 16)
Extracted data shape for event with onset 497.9: (110, 104, 27, 16)
Extracted data shape for event with onset 93.3: (110, 104, 27, 16)
Extracted data shape for event with onset 241.9: (110, 104, 27, 16)
Extracted data shape for event with onset 302.7: (110, 104, 27, 16)
Extracted data shape for event with onset 385.1: (110, 104, 27, 16)
Extracted data shape for event with onset 590.9: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-08/func/sub-08_task-odors_run-01_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 440)
Extracted data shape for event with onset 189.3: (110, 104, 27, 16)
Extracted data shape for event with onset 486.7: (110, 104, 27, 16)
Extracted data shape for event with onset 40.1: (110, 104, 27, 16)
Extracted data shape for event with onset 277.8: (110, 104, 27, 16)
Extracted data shape for event with onset 426.0: (110, 104, 27, 16)
Extracted data shape for event with onset 70.4: (110, 104, 27, 16)
Extracted data shape for event with onset 335.2: (110, 104, 27, 16)
Extracted data shape for event with onset 455.8: (110, 104, 27, 16)
Extracted data shape for event with onset 545.7: (110, 104, 27, 16)
Extracted data shape for event with onset 129.8: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-08/func/sub-08_task-odors_run-01_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 440)
Extracted data shape for event with onset 12.9: (110, 104, 27, 16)
Extracted data shape for event with onset 158.6: (110, 104, 27, 16)
Extracted data shape for event with onset 307.0: (110, 104, 27, 16)
Extracted data shape for event with onset 365.9: (110, 104, 27, 16)
Extracted data shape for event with onset 574.8: (110, 104, 27, 16)
Extracted data shape for event with onset 99.9: (110, 104, 27, 16)
Extracted data shape for event with onset 221.8: (110, 104, 27, 16)
Extracted data shape for event with onset 250.9: (110, 104, 27, 16)
Extracted data shape for event with onset 395.0: (110, 104, 27, 16)
Extracted data shape for event with onset 514.7: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-01/func/sub-01_task-odors_run-01_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 415)
Extracted data shape for event with onset 97.0: (110, 104, 27, 16)
Extracted data shape for event with onset 155.4: (110, 104, 27, 16)
Extracted data shape for event with onset 269.3: (110, 104, 27, 16)
Extracted data shape for event with onset 352.9: (110, 104, 27, 16)
Extracted data shape for event with onset 471.3: (110, 104, 27, 16)
Extracted data shape for event with onset 65.7: (110, 104, 27, 16)
Extracted data shape for event with onset 185.3: (110, 104, 27, 16)
Extracted data shape for event with onset 296.0: (110, 104, 27, 16)
Extracted data shape for event with onset 443.5: (110, 104, 27, 16)
Extracted data shape for event with onset 529.5: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-01/func/sub-01_task-odors_run-01_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 415)
Extracted data shape for event with onset 39.0: (110, 104, 27, 16)
Extracted data shape for event with onset 215.6: (110, 104, 27, 16)
Extracted data shape for event with onset 326.7: (110, 104, 27, 16)
Extracted data shape for event with onset 383.6: (110, 104, 27, 16)
Extracted data shape for event with onset 500.4: (110, 104, 27, 16)
Extracted data shape for event with onset 8.8: (110, 104, 27, 16)
Extracted data shape for event with onset 125.8: (110, 104, 27, 16)
Extracted data shape for event with onset 243.6: (110, 104, 27, 16)
Extracted data shape for event with onset 412.3: (110, 104, 27, 16)
Extracted data shape for event with onset 559.4: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-01/func/sub-01_task-odors_run-02_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 440)
Extracted data shape for event with onset 32.8: (110, 104, 27, 16)
Extracted data shape for event with onset 203.1: (110, 104, 27, 16)
Extracted data shape for event with onset 289.6: (110, 104, 27, 16)
Extracted data shape for event with onset 463.6: (110, 104, 27, 16)
Extracted data shape for event with onset 490.3: (110, 104, 27, 16)
Extracted data shape for event with onset 3.5: (110, 104, 27, 16)
Extracted data shape for event with onset 119.8: (110, 104, 27, 16)
Extracted data shape for event with onset 231.8: (110, 104, 27, 16)
Extracted data shape for event with onset 346.0: (110, 104, 27, 16)
Extracted data shape for event with onset 373.7: (110, 104, 27, 16)
Extracted data shape for event with onset 550.2: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-01/func/sub-01_task-odors_run-02_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 440)
Extracted data shape for event with onset 62.3: (110, 104, 27, 16)
Extracted data shape for event with onset 175.9: (110, 104, 27, 16)
Extracted data shape for event with onset 258.6: (110, 104, 27, 16)
Extracted data shape for event with onset 435.4: (110, 104, 27, 16)
Extracted data shape for event with onset 576.8: (110, 104, 27, 16)
Extracted data shape for event with onset 92.0: (110, 104, 27, 16)
Extracted data shape for event with onset 147.6: (110, 104, 27, 16)
Extracted data shape for event with onset 319.6: (110, 104, 27, 16)
Extracted data shape for event with onset 402.2: (110, 104, 27, 16)
Extracted data shape for event with onset 521.5: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-06/func/sub-06_task-odors_run-02_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 440)
Extracted data shape for event with onset 32.7: (110, 104, 27, 16)
Extracted data shape for event with onset 197.8: (110, 104, 27, 16)
Extracted data shape for event with onset 285.1: (110, 104, 27, 16)
Extracted data shape for event with onset 466.5: (110, 104, 27, 16)
Extracted data shape for event with onset 496.3: (110, 104, 27, 16)
Extracted data shape for event with onset 1.4: (110, 104, 27, 16)
Extracted data shape for event with onset 116.8: (110, 104, 27, 16)
Extracted data shape for event with onset 227.6: (110, 104, 27, 16)
Extracted data shape for event with onset 345.9: (110, 104, 27, 16)
Extracted data shape for event with onset 376.6: (110, 104, 27, 16)
Extracted data shape for event with onset 558.2: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-06/func/sub-06_task-odors_run-02_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 440)
Extracted data shape for event with onset 63.4: (110, 104, 27, 16)
Extracted data shape for event with onset 171.6: (110, 104, 27, 16)
Extracted data shape for event with onset 254.5: (110, 104, 27, 16)
Extracted data shape for event with onset 438.6: (110, 104, 27, 16)
Extracted data shape for event with onset 588.6: (110, 104, 27, 16)
Extracted data shape for event with onset 90.8: (110, 104, 27, 16)
Extracted data shape for event with onset 145.1: (110, 104, 27, 16)
Extracted data shape for event with onset 314.9: (110, 104, 27, 16)
Extracted data shape for event with onset 405.3: (110, 104, 27, 16)
Extracted data shape for event with onset 528.9: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-06/func/sub-06_task-odors_run-01_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 429)
Extracted data shape for event with onset 104.2: (110, 104, 27, 16)
Extracted data shape for event with onset 161.4: (110, 104, 27, 16)
Extracted data shape for event with onset 281.1: (110, 104, 27, 16)
Extracted data shape for event with onset 367.6: (110, 104, 27, 16)
Extracted data shape for event with onset 489.7: (110, 104, 27, 16)
Extracted data shape for event with onset 75.1: (110, 104, 27, 16)
Extracted data shape for event with onset 192.3: (110, 104, 27, 16)
Extracted data shape for event with onset 309.4: (110, 104, 27, 16)
Extracted data shape for event with onset 459.5: (110, 104, 27, 16)
Extracted data shape for event with onset 550.0: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-06/func/sub-06_task-odors_run-01_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 429)
Extracted data shape for event with onset 48.7: (110, 104, 27, 16)
Extracted data shape for event with onset 223.7: (110, 104, 27, 16)
Extracted data shape for event with onset 339.0: (110, 104, 27, 16)
Extracted data shape for event with onset 397.9: (110, 104, 27, 16)
Extracted data shape for event with onset 519.5: (110, 104, 27, 16)
Extracted data shape for event with onset 18.8: (110, 104, 27, 16)
Extracted data shape for event with onset 132.1: (110, 104, 27, 16)
Extracted data shape for event with onset 253.0: (110, 104, 27, 16)
Extracted data shape for event with onset 428.6: (110, 104, 27, 16)
Extracted data shape for event with onset 585.4: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-07/func/sub-07_task-odors_run-01_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 440)
Extracted data shape for event with onset 103.3: (110, 104, 27, 16)
Extracted data shape for event with onset 162.8: (110, 104, 27, 16)
Extracted data shape for event with onset 275.0: (110, 104, 27, 16)
Extracted data shape for event with onset 364.2: (110, 104, 27, 16)
Extracted data shape for event with onset 482.1: (110, 104, 27, 16)
Extracted data shape for event with onset 75.4: (110, 104, 27, 16)
Extracted data shape for event with onset 190.4: (110, 104, 27, 16)
Extracted data shape for event with onset 303.5: (110, 104, 27, 16)
Extracted data shape for event with onset 456.2: (110, 104, 27, 16)
Extracted data shape for event with onset 540.8: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-07/func/sub-07_task-odors_run-01_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 440)
Extracted data shape for event with onset 49.6: (110, 104, 27, 16)
Extracted data shape for event with onset 219.3: (110, 104, 27, 16)
Extracted data shape for event with onset 334.5: (110, 104, 27, 16)
Extracted data shape for event with onset 395.3: (110, 104, 27, 16)
Extracted data shape for event with onset 511.12: (110, 104, 27, 16)
Extracted data shape for event with onset 21.5: (110, 104, 27, 16)
Extracted data shape for event with onset 133.7: (110, 104, 27, 16)
Extracted data shape for event with onset 248.4: (110, 104, 27, 16)
Extracted data shape for event with onset 425.5: (110, 104, 27, 16)
Extracted data shape for event with onset 575.1: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-07/func/sub-07_task-odors_run-02_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 440)
Extracted data shape for event with onset 32.9: (110, 104, 27, 16)
Extracted data shape for event with onset 196.5: (110, 104, 27, 16)
Extracted data shape for event with onset 282.7: (110, 104, 27, 16)
Extracted data shape for event with onset 456.0: (110, 104, 27, 16)
Extracted data shape for event with onset 484.6: (110, 104, 27, 16)
Extracted data shape for event with onset 4.0: (110, 104, 27, 16)
Extracted data shape for event with onset 112.4: (110, 104, 27, 16)
Extracted data shape for event with onset 225.0: (110, 104, 27, 16)
Extracted data shape for event with onset 340.5: (110, 104, 27, 16)
Extracted data shape for event with onset 368.3: (110, 104, 27, 16)
Extracted data shape for event with onset 543.0: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-07/func/sub-07_task-odors_run-02_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 440)
Extracted data shape for event with onset 60.3: (110, 104, 27, 16)
Extracted data shape for event with onset 168.3: (110, 104, 27, 16)
Extracted data shape for event with onset 250.7: (110, 104, 27, 16)
Extracted data shape for event with onset 426.9: (110, 104, 27, 16)
Extracted data shape for event with onset 574.1: (110, 104, 27, 16)
Extracted data shape for event with onset 85.3: (110, 104, 27, 16)
Extracted data shape for event with onset 140.2: (110, 104, 27, 16)
Extracted data shape for event with onset 313.0: (110, 104, 27, 16)
Extracted data shape for event with onset 396.1: (110, 104, 27, 16)
Extracted data shape for event with onset 516.4: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-09/func/sub-09_task-odors_run-01_bold_preprocessed.nii.gz, Shape: (110, 104, 26, 440)
Extracted data shape for event with onset 11.8: (110, 104, 26, 16)
Extracted data shape for event with onset 131.4: (110, 104, 26, 16)
Extracted data shape for event with onset 282.9: (110, 104, 26, 16)
Extracted data shape for event with onset 455.9: (110, 104, 26, 16)
Extracted data shape for event with onset 581.0: (110, 104, 26, 16)
Extracted data shape for event with onset 101.9: (110, 104, 26, 16)
Extracted data shape for event with onset 194.0: (110, 104, 26, 16)
Extracted data shape for event with onset 255.1: (110, 104, 26, 16)
Extracted data shape for event with onset 423.2: (110, 104, 26, 16)
Extracted data shape for event with onset 487.2: (110, 104, 26, 16)
Loaded NIfTI file: ds002185-download/sub-09/func/sub-09_task-odors_run-01_bold_preprocessed.nii.gz, Shape: (110, 104, 26, 440)
Extracted data shape for event with onset 70.7: (110, 104, 26, 16)
Extracted data shape for event with onset 224.7: (110, 104, 26, 16)
Extracted data shape for event with onset 339.5: (110, 104, 26, 16)
Extracted data shape for event with onset 369.0: (110, 104, 26, 16)
Extracted data shape for event with onset 518.2: (110, 104, 26, 16)
Extracted data shape for event with onset 40.8: (110, 104, 26, 16)
Extracted data shape for event with onset 164.3: (110, 104, 26, 16)
Extracted data shape for event with onset 311.6: (110, 104, 26, 16)
Extracted data shape for event with onset 397.1: (110, 104, 26, 16)
Extracted data shape for event with onset 552.5: (110, 104, 26, 16)
Loaded NIfTI file: ds002185-download/sub-09/func/sub-09_task-odors_run-02_bold_preprocessed.nii.gz, Shape: (110, 104, 26, 440)
Extracted data shape for event with onset 99.1: (110, 104, 26, 16)
Extracted data shape for event with onset 243.4: (110, 104, 26, 16)
Extracted data shape for event with onset 388.8: (110, 104, 26, 16)
Extracted data shape for event with onset 417.8: (110, 104, 26, 16)
Extracted data shape for event with onset 155.0: (110, 104, 26, 16)
Extracted data shape for event with onset 276.2: (110, 104, 26, 16)
Extracted data shape for event with onset 333.1: (110, 104, 26, 16)
Extracted data shape for event with onset 451.6: (110, 104, 26, 16)
Loaded NIfTI file: ds002185-download/sub-09/func/sub-09_task-odors_run-02_bold_preprocessed.nii.gz, Shape: (110, 104, 26, 440)
Extracted data shape for event with onset 7.2: (110, 104, 26, 16)
Extracted data shape for event with onset 126.7: (110, 104, 26, 16)
Extracted data shape for event with onset 184.3: (110, 104, 26, 16)
Extracted data shape for event with onset 303.6: (110, 104, 26, 16)
Extracted data shape for event with onset 486.0: (110, 104, 26, 16)
Extracted data shape for event with onset 39.8: (110, 104, 26, 16)
Extracted data shape for event with onset 71.5: (110, 104, 26, 16)
Extracted data shape for event with onset 215.3: (110, 104, 26, 16)
Extracted data shape for event with onset 360.8: (110, 104, 26, 16)
Extracted data shape for event with onset 515.9: (110, 104, 26, 16)
Loaded NIfTI file: ds002185-download/sub-17/func/sub-17_task-odors_run-01_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 425)
Extracted data shape for event with onset 42.0: (110, 104, 27, 16)
Extracted data shape for event with onset 154.7: (110, 104, 27, 16)
Extracted data shape for event with onset 292.6: (110, 104, 27, 16)
Extracted data shape for event with onset 407.5: (110, 104, 27, 16)
Extracted data shape for event with onset 516.3: (110, 104, 27, 16)
Extracted data shape for event with onset 97.6: (110, 104, 27, 16)
Extracted data shape for event with onset 181.3: (110, 104, 27, 16)
Extracted data shape for event with onset 322.3: (110, 104, 27, 16)
Extracted data shape for event with onset 434.1: (110, 104, 27, 16)
Extracted data shape for event with onset 490.4: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-17/func/sub-17_task-odors_run-01_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 425)
Extracted data shape for event with onset 12.5: (110, 104, 27, 16)
Extracted data shape for event with onset 124.1: (110, 104, 27, 16)
Extracted data shape for event with onset 240.8: (110, 104, 27, 16)
Extracted data shape for event with onset 379.8: (110, 104, 27, 16)
Extracted data shape for event with onset 461.4: (110, 104, 27, 16)
Extracted data shape for event with onset 69.0: (110, 104, 27, 16)
Extracted data shape for event with onset 209.8: (110, 104, 27, 16)
Extracted data shape for event with onset 266.9: (110, 104, 27, 16)
Extracted data shape for event with onset 351.9: (110, 104, 27, 16)
Extracted data shape for event with onset 548.5: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-17/func/sub-17_task-odors_run-02_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 425)
Extracted data shape for event with onset 2.5: (110, 104, 27, 16)
Extracted data shape for event with onset 30.4: (110, 104, 27, 16)
Extracted data shape for event with onset 58.2: (110, 104, 27, 16)
Extracted data shape for event with onset 177.3: (110, 104, 27, 16)
Extracted data shape for event with onset 207.1: (110, 104, 27, 16)
Extracted data shape for event with onset 267.9: (110, 104, 27, 16)
Extracted data shape for event with onset 300.4: (110, 104, 27, 16)
Extracted data shape for event with onset 414.3: (110, 104, 27, 16)
Extracted data shape for event with onset 439.8: (110, 104, 27, 16)
Extracted data shape for event with onset 565.6: (110, 104, 27, 16)
Extracted data shape for event with onset 595.3: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-17/func/sub-17_task-odors_run-02_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 425)
Extracted data shape for event with onset 84.1: (110, 104, 27, 16)
Extracted data shape for event with onset 116.0: (110, 104, 27, 16)
Extracted data shape for event with onset 144.8: (110, 104, 27, 16)
Extracted data shape for event with onset 237.3: (110, 104, 27, 16)
Extracted data shape for event with onset 329.6: (110, 104, 27, 16)
Extracted data shape for event with onset 357.1: (110, 104, 27, 16)
Extracted data shape for event with onset 385.9: (110, 104, 27, 16)
Extracted data shape for event with onset 472.3: (110, 104, 27, 16)
Extracted data shape for event with onset 503.0: (110, 104, 27, 16)
Extracted data shape for event with onset 534.6: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-10/func/sub-10_task-odors_run-02_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 432)
Extracted data shape for event with onset 34.6: (110, 104, 27, 16)
Extracted data shape for event with onset 159.1: (110, 104, 27, 16)
Extracted data shape for event with onset 307.7: (110, 104, 27, 16)
Extracted data shape for event with onset 480.7: (110, 104, 27, 16)
Extracted data shape for event with onset 598.5: (110, 104, 27, 16)
Extracted data shape for event with onset 3.4: (110, 104, 27, 16)
Extracted data shape for event with onset 126.8: (110, 104, 27, 16)
Extracted data shape for event with onset 220.1: (110, 104, 27, 16)
Extracted data shape for event with onset 280.0: (110, 104, 27, 16)
Extracted data shape for event with onset 448.4: (110, 104, 27, 16)
Extracted data shape for event with onset 513.7: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-10/func/sub-10_task-odors_run-02_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 432)
Extracted data shape for event with onset 94.0: (110, 104, 27, 16)
Extracted data shape for event with onset 248.7: (110, 104, 27, 16)
Extracted data shape for event with onset 366.1: (110, 104, 27, 16)
Extracted data shape for event with onset 394.2: (110, 104, 27, 16)
Extracted data shape for event with onset 539.8: (110, 104, 27, 16)
Extracted data shape for event with onset 61.2: (110, 104, 27, 16)
Extracted data shape for event with onset 189.2: (110, 104, 27, 16)
Extracted data shape for event with onset 338.8: (110, 104, 27, 16)
Extracted data shape for event with onset 420.7: (110, 104, 27, 16)
Extracted data shape for event with onset 571.3: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-10/func/sub-10_task-odors_run-01_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 440)
Extracted data shape for event with onset 37.5: (110, 104, 27, 16)
Extracted data shape for event with onset 151.7: (110, 104, 27, 16)
Extracted data shape for event with onset 302.7: (110, 104, 27, 16)
Extracted data shape for event with onset 423.7: (110, 104, 27, 16)
Extracted data shape for event with onset 545.9: (110, 104, 27, 16)
Extracted data shape for event with onset 90.0: (110, 104, 27, 16)
Extracted data shape for event with onset 182.0: (110, 104, 27, 16)
Extracted data shape for event with onset 332.2: (110, 104, 27, 16)
Extracted data shape for event with onset 453.9: (110, 104, 27, 16)
Extracted data shape for event with onset 518.4: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-10/func/sub-10_task-odors_run-01_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 440)
Extracted data shape for event with onset 9.7: (110, 104, 27, 16)
Extracted data shape for event with onset 121.4: (110, 104, 27, 16)
Extracted data shape for event with onset 243.8: (110, 104, 27, 16)
Extracted data shape for event with onset 392.0: (110, 104, 27, 16)
Extracted data shape for event with onset 484.8: (110, 104, 27, 16)
Extracted data shape for event with onset 63.8: (110, 104, 27, 16)
Extracted data shape for event with onset 214.5: (110, 104, 27, 16)
Extracted data shape for event with onset 273.6: (110, 104, 27, 16)
Extracted data shape for event with onset 360.6: (110, 104, 27, 16)
Extracted data shape for event with onset 580.6: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-19/func/sub-19_task-odors_run-01_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 417)
Extracted data shape for event with onset 10.6: (110, 104, 27, 16)
Extracted data shape for event with onset 131.2: (110, 104, 27, 16)
Extracted data shape for event with onset 274.6: (110, 104, 27, 16)
Extracted data shape for event with onset 446.6: (110, 104, 27, 16)
Extracted data shape for event with onset 575.2: (110, 104, 27, 16)
Extracted data shape for event with onset 101.3: (110, 104, 27, 16)
Extracted data shape for event with onset 189.0: (110, 104, 27, 16)
Extracted data shape for event with onset 246.5: (110, 104, 27, 16)
Extracted data shape for event with onset 416.5: (110, 104, 27, 16)
Extracted data shape for event with onset 477.9: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-19/func/sub-19_task-odors_run-01_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 417)
Extracted data shape for event with onset 69.0: (110, 104, 27, 16)
Extracted data shape for event with onset 217.2: (110, 104, 27, 16)
Extracted data shape for event with onset 332.1: (110, 104, 27, 16)
Extracted data shape for event with onset 359.8: (110, 104, 27, 16)
Extracted data shape for event with onset 512.3: (110, 104, 27, 16)
Extracted data shape for event with onset 37.4: (110, 104, 27, 16)
Extracted data shape for event with onset 159.4: (110, 104, 27, 16)
Extracted data shape for event with onset 304.4: (110, 104, 27, 16)
Extracted data shape for event with onset 387.6: (110, 104, 27, 16)
Extracted data shape for event with onset 548.0: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-19/func/sub-19_task-odors_run-02_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 440)
Extracted data shape for event with onset 340.6: (110, 104, 27, 16)
Extracted data shape for event with onset 65.9: (110, 104, 27, 16)
Extracted data shape for event with onset 190.1: (110, 104, 27, 16)
Extracted data shape for event with onset 494.1: (110, 104, 27, 16)
Extracted data shape for event with onset 520.6: (110, 104, 27, 16)
Extracted data shape for event with onset 5.8: (110, 104, 27, 16)
Extracted data shape for event with onset 36.4: (110, 104, 27, 16)
Extracted data shape for event with onset 246.5: (110, 104, 27, 16)
Extracted data shape for event with onset 368.2: (110, 104, 27, 16)
Extracted data shape for event with onset 440.0: (110, 104, 27, 16)
Extracted data shape for event with onset 552.7: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-19/func/sub-19_task-odors_run-02_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 440)
Extracted data shape for event with onset 95.7: (110, 104, 27, 16)
Extracted data shape for event with onset 220.0: (110, 104, 27, 16)
Extracted data shape for event with onset 276.5: (110, 104, 27, 16)
Extracted data shape for event with onset 399.6: (110, 104, 27, 16)
Extracted data shape for event with onset 583.5: (110, 104, 27, 16)
Extracted data shape for event with onset 129.0: (110, 104, 27, 16)
Extracted data shape for event with onset 161.0: (110, 104, 27, 16)
Extracted data shape for event with onset 309.5: (110, 104, 27, 16)
Extracted data shape for event with onset 465.4: (110, 104, 27, 16)
Extracted data shape for event with onset 612.7: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-20/func/sub-20_task-odors_run-01_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 440)
Extracted data shape for event with onset 101.5: (110, 104, 27, 16)
Extracted data shape for event with onset 130.2: (110, 104, 27, 16)
Extracted data shape for event with onset 276.9: (110, 104, 27, 16)
Extracted data shape for event with onset 414.6: (110, 104, 27, 16)
Extracted data shape for event with onset 561.8: (110, 104, 27, 16)
Extracted data shape for event with onset 13.0: (110, 104, 27, 16)
Extracted data shape for event with onset 220.4: (110, 104, 27, 16)
Extracted data shape for event with onset 331.3: (110, 104, 27, 16)
Extracted data shape for event with onset 444.9: (110, 104, 27, 16)
Extracted data shape for event with onset 473.8: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-20/func/sub-20_task-odors_run-01_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 440)
Extracted data shape for event with onset 43.0: (110, 104, 27, 16)
Extracted data shape for event with onset 71.4: (110, 104, 27, 16)
Extracted data shape for event with onset 189.2: (110, 104, 27, 16)
Extracted data shape for event with onset 358.3: (110, 104, 27, 16)
Extracted data shape for event with onset 499.2: (110, 104, 27, 16)
Extracted data shape for event with onset 160.9: (110, 104, 27, 16)
Extracted data shape for event with onset 247.0: (110, 104, 27, 16)
Extracted data shape for event with onset 306.4: (110, 104, 27, 16)
Extracted data shape for event with onset 385.4: (110, 104, 27, 16)
Extracted data shape for event with onset 529.4: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-20/func/sub-20_task-odors_run-02_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 421)
Extracted data shape for event with onset 125.3: (110, 104, 27, 16)
Extracted data shape for event with onset 156.6: (110, 104, 27, 16)
Extracted data shape for event with onset 273.9: (110, 104, 27, 16)
Extracted data shape for event with onset 386.8: (110, 104, 27, 16)
Extracted data shape for event with onset 563.1: (110, 104, 27, 16)
Extracted data shape for event with onset 3.0: (110, 104, 27, 16)
Extracted data shape for event with onset 65.4: (110, 104, 27, 16)
Extracted data shape for event with onset 246.9: (110, 104, 27, 16)
Extracted data shape for event with onset 300.4: (110, 104, 27, 16)
Extracted data shape for event with onset 417.6: (110, 104, 27, 16)
Extracted data shape for event with onset 505.9: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-20/func/sub-20_task-odors_run-02_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 421)
Extracted data shape for event with onset 33.8: (110, 104, 27, 16)
Extracted data shape for event with onset 216.6: (110, 104, 27, 16)
Extracted data shape for event with onset 358.3: (110, 104, 27, 16)
Extracted data shape for event with onset 479.4: (110, 104, 27, 16)
Extracted data shape for event with onset 534.0: (110, 104, 27, 16)
Extracted data shape for event with onset 95.1: (110, 104, 27, 16)
Extracted data shape for event with onset 185.8: (110, 104, 27, 16)
Extracted data shape for event with onset 332.8: (110, 104, 27, 16)
Extracted data shape for event with onset 450.2: (110, 104, 27, 16)
Extracted data shape for event with onset 594.8: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-18/func/sub-18_task-odors_run-02_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 421)
Extracted data shape for event with onset 60.1: (110, 104, 27, 16)
Extracted data shape for event with onset 181.8: (110, 104, 27, 16)
Extracted data shape for event with onset 326.9: (110, 104, 27, 16)
Extracted data shape for event with onset 471.5: (110, 104, 27, 16)
Extracted data shape for event with onset 498.3: (110, 104, 27, 16)
Extracted data shape for event with onset 1.7: (110, 104, 27, 16)
Extracted data shape for event with onset 30.6: (110, 104, 27, 16)
Extracted data shape for event with onset 239.8: (110, 104, 27, 16)
Extracted data shape for event with onset 358.1: (110, 104, 27, 16)
Extracted data shape for event with onset 414.2: (110, 104, 27, 16)
Extracted data shape for event with onset 528.4: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-18/func/sub-18_task-odors_run-02_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 421)
Extracted data shape for event with onset 92.3: (110, 104, 27, 16)
Extracted data shape for event with onset 210.2: (110, 104, 27, 16)
Extracted data shape for event with onset 266.6: (110, 104, 27, 16)
Extracted data shape for event with onset 384.3: (110, 104, 27, 16)
Extracted data shape for event with onset 556.8: (110, 104, 27, 16)
Extracted data shape for event with onset 121.2: (110, 104, 27, 16)
Extracted data shape for event with onset 153.5: (110, 104, 27, 16)
Extracted data shape for event with onset 298.2: (110, 104, 27, 16)
Extracted data shape for event with onset 443.0: (110, 104, 27, 16)
Extracted data shape for event with onset 583.4: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-18/func/sub-18_task-odors_run-01_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 440)
Extracted data shape for event with onset 8.7: (110, 104, 27, 16)
Extracted data shape for event with onset 126.2: (110, 104, 27, 16)
Extracted data shape for event with onset 271.7: (110, 104, 27, 16)
Extracted data shape for event with onset 441.2: (110, 104, 27, 16)
Extracted data shape for event with onset 559.0: (110, 104, 27, 16)
Extracted data shape for event with onset 96.2: (110, 104, 27, 16)
Extracted data shape for event with onset 186.1: (110, 104, 27, 16)
Extracted data shape for event with onset 244.9: (110, 104, 27, 16)
Extracted data shape for event with onset 410.0: (110, 104, 27, 16)
Extracted data shape for event with onset 471.5: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-18/func/sub-18_task-odors_run-01_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 440)
Extracted data shape for event with onset 66.5: (110, 104, 27, 16)
Extracted data shape for event with onset 214.0: (110, 104, 27, 16)
Extracted data shape for event with onset 327.7: (110, 104, 27, 16)
Extracted data shape for event with onset 356.1: (110, 104, 27, 16)
Extracted data shape for event with onset 500.4: (110, 104, 27, 16)
Extracted data shape for event with onset 35.6: (110, 104, 27, 16)
Extracted data shape for event with onset 155.5: (110, 104, 27, 16)
Extracted data shape for event with onset 301.7: (110, 104, 27, 16)
Extracted data shape for event with onset 384.1: (110, 104, 27, 16)
Extracted data shape for event with onset 532.6: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-11/func/sub-11_task-odors_run-01_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 428)
Extracted data shape for event with onset 12.0: (110, 104, 27, 16)
Extracted data shape for event with onset 127.8: (110, 104, 27, 16)
Extracted data shape for event with onset 273.8: (110, 104, 27, 16)
Extracted data shape for event with onset 446.1: (110, 104, 27, 16)
Extracted data shape for event with onset 561.3: (110, 104, 27, 16)
Extracted data shape for event with onset 99.5: (110, 104, 27, 16)
Extracted data shape for event with onset 189.4: (110, 104, 27, 16)
Extracted data shape for event with onset 246.4: (110, 104, 27, 16)
Extracted data shape for event with onset 415.0: (110, 104, 27, 16)
Extracted data shape for event with onset 474.6: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-11/func/sub-11_task-odors_run-01_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 428)
Extracted data shape for event with onset 69.0: (110, 104, 27, 16)
Extracted data shape for event with onset 216.1: (110, 104, 27, 16)
Extracted data shape for event with onset 330.4: (110, 104, 27, 16)
Extracted data shape for event with onset 359.0: (110, 104, 27, 16)
Extracted data shape for event with onset 505.8: (110, 104, 27, 16)
Extracted data shape for event with onset 39.3: (110, 104, 27, 16)
Extracted data shape for event with onset 158.0: (110, 104, 27, 16)
Extracted data shape for event with onset 305.1: (110, 104, 27, 16)
Extracted data shape for event with onset 385.4: (110, 104, 27, 16)
Extracted data shape for event with onset 534.8: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-11/func/sub-11_task-odors_run-02_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 413)
Extracted data shape for event with onset 182.7: (110, 104, 27, 16)
Extracted data shape for event with onset 319.4: (110, 104, 27, 16)
Extracted data shape for event with onset 467.6: (110, 104, 27, 16)
Extracted data shape for event with onset 493.4: (110, 104, 27, 16)
Extracted data shape for event with onset 61.5: (110, 104, 27, 16)
Extracted data shape for event with onset 4.6: (110, 104, 27, 16)
Extracted data shape for event with onset 235.0: (110, 104, 27, 16)
Extracted data shape for event with onset 353.0: (110, 104, 27, 16)
Extracted data shape for event with onset 412.1: (110, 104, 27, 16)
Extracted data shape for event with onset 522.2: (110, 104, 27, 16)
Extracted data shape for event with onset 32.8: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-11/func/sub-11_task-odors_run-02_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 413)
Extracted data shape for event with onset 92.9: (110, 104, 27, 16)
Extracted data shape for event with onset 208.2: (110, 104, 27, 16)
Extracted data shape for event with onset 261.0: (110, 104, 27, 16)
Extracted data shape for event with onset 383.2: (110, 104, 27, 16)
Extracted data shape for event with onset 551.2: (110, 104, 27, 16)
Extracted data shape for event with onset 291.9: (110, 104, 27, 16)
Extracted data shape for event with onset 439.3: (110, 104, 27, 16)
Extracted data shape for event with onset 579.4: (110, 104, 27, 16)
Extracted data shape for event with onset 124.9: (110, 104, 27, 16)
Extracted data shape for event with onset 154.6: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-16/func/sub-16_task-odors_run-02_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 463)
Extracted data shape for event with onset 17.0: (110, 104, 27, 16)
Extracted data shape for event with onset 183.5: (110, 104, 27, 16)
Extracted data shape for event with onset 266.9: (110, 104, 27, 16)
Extracted data shape for event with onset 380.3: (110, 104, 27, 16)
Extracted data shape for event with onset 491.5: (110, 104, 27, 16)
Extracted data shape for event with onset 633.2: (110, 104, 27, 16)
Extracted data shape for event with onset 97.6: (110, 104, 27, 16)
Extracted data shape for event with onset 126.2: (110, 104, 27, 16)
Extracted data shape for event with onset 296.8: (110, 104, 27, 16)
Extracted data shape for event with onset 350.9: (110, 104, 27, 16)
Extracted data shape for event with onset 463.0: (110, 104, 27, 16)
Extracted data shape for event with onset 605.2: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-16/func/sub-16_task-odors_run-02_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 463)
Extracted data shape for event with onset 72.2: (110, 104, 27, 16)
Extracted data shape for event with onset 154.7: (110, 104, 27, 16)
Extracted data shape for event with onset 323.3: (110, 104, 27, 16)
Extracted data shape for event with onset 410.0: (110, 104, 27, 16)
Extracted data shape for event with onset 519.5: (110, 104, 27, 16)
Extracted data shape for event with onset 577.4: (110, 104, 27, 16)
Extracted data shape for event with onset 41.8: (110, 104, 27, 16)
Extracted data shape for event with onset 213.9: (110, 104, 27, 16)
Extracted data shape for event with onset 243.1: (110, 104, 27, 16)
Extracted data shape for event with onset 437.2: (110, 104, 27, 16)
Extracted data shape for event with onset 551.4: (110, 104, 27, 16)
Extracted data shape for event with onset 664.9: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-16/func/sub-16_task-odors_run-01_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 465)
Extracted data shape for event with onset 105.4: (110, 104, 27, 16)
Extracted data shape for event with onset 263.5: (110, 104, 27, 16)
Extracted data shape for event with onset 381.0: (110, 104, 27, 16)
Extracted data shape for event with onset 407.1: (110, 104, 27, 16)
Extracted data shape for event with onset 603.3: (110, 104, 27, 16)
Extracted data shape for event with onset 17.1: (110, 104, 27, 16)
Extracted data shape for event with onset 132.1: (110, 104, 27, 16)
Extracted data shape for event with onset 187.1: (110, 104, 27, 16)
Extracted data shape for event with onset 351.1: (110, 104, 27, 16)
Extracted data shape for event with onset 462.5: (110, 104, 27, 16)
Extracted data shape for event with onset 519.9: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-16/func/sub-16_task-odors_run-01_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 465)
Extracted data shape for event with onset 46.9: (110, 104, 27, 16)
Extracted data shape for event with onset 74.8: (110, 104, 27, 16)
Extracted data shape for event with onset 237.3: (110, 104, 27, 16)
Extracted data shape for event with onset 322.5: (110, 104, 27, 16)
Extracted data shape for event with onset 432.6: (110, 104, 27, 16)
Extracted data shape for event with onset 548.8: (110, 104, 27, 16)
Extracted data shape for event with onset 161.1: (110, 104, 27, 16)
Extracted data shape for event with onset 211.1: (110, 104, 27, 16)
Extracted data shape for event with onset 295.7: (110, 104, 27, 16)
Extracted data shape for event with onset 489.0: (110, 104, 27, 16)
Extracted data shape for event with onset 577.5: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-05/func/sub-05_task-odors_run-02_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 414)
Extracted data shape for event with onset 61.3: (110, 104, 27, 16)
Extracted data shape for event with onset 180.2: (110, 104, 27, 16)
Extracted data shape for event with onset 323.7: (110, 104, 27, 16)
Extracted data shape for event with onset 464.3: (110, 104, 27, 16)
Extracted data shape for event with onset 491.8: (110, 104, 27, 16)
Extracted data shape for event with onset 3.5: (110, 104, 27, 16)
Extracted data shape for event with onset 32.3: (110, 104, 27, 16)
Extracted data shape for event with onset 237.8: (110, 104, 27, 16)
Extracted data shape for event with onset 353.3: (110, 104, 27, 16)
Extracted data shape for event with onset 410.8: (110, 104, 27, 16)
Extracted data shape for event with onset 522.4: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-05/func/sub-05_task-odors_run-02_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 414)
Extracted data shape for event with onset 89.8: (110, 104, 27, 16)
Extracted data shape for event with onset 208.4: (110, 104, 27, 16)
Extracted data shape for event with onset 264.7: (110, 104, 27, 16)
Extracted data shape for event with onset 379.5: (110, 104, 27, 16)
Extracted data shape for event with onset 551.7: (110, 104, 27, 16)
Extracted data shape for event with onset 121.9: (110, 104, 27, 16)
Extracted data shape for event with onset 152.4: (110, 104, 27, 16)
Extracted data shape for event with onset 294.0: (110, 104, 27, 16)
Extracted data shape for event with onset 437.5: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-05/func/sub-05_task-odors_run-01_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 420)
Extracted data shape for event with onset 13.3: (110, 104, 27, 16)
Extracted data shape for event with onset 133.3: (110, 104, 27, 16)
Extracted data shape for event with onset 278.6: (110, 104, 27, 16)
Extracted data shape for event with onset 450.2: (110, 104, 27, 16)
Extracted data shape for event with onset 562.9: (110, 104, 27, 16)
Extracted data shape for event with onset 104.1: (110, 104, 27, 16)
Extracted data shape for event with onset 195.3: (110, 104, 27, 16)
Extracted data shape for event with onset 251.7: (110, 104, 27, 16)
Extracted data shape for event with onset 419.1: (110, 104, 27, 16)
Extracted data shape for event with onset 478.6: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-05/func/sub-05_task-odors_run-01_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 420)
Extracted data shape for event with onset 73.6: (110, 104, 27, 16)
Extracted data shape for event with onset 222.2: (110, 104, 27, 16)
Extracted data shape for event with onset 334.9: (110, 104, 27, 16)
Extracted data shape for event with onset 362.3: (110, 104, 27, 16)
Extracted data shape for event with onset 506.0: (110, 104, 27, 16)
Extracted data shape for event with onset 40.7: (110, 104, 27, 16)
Extracted data shape for event with onset 164.1: (110, 104, 27, 16)
Extracted data shape for event with onset 309.2: (110, 104, 27, 16)
Extracted data shape for event with onset 390.1: (110, 104, 27, 16)
Extracted data shape for event with onset 537.5: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-02/func/sub-02_task-odors_run-01_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 440)
Extracted data shape for event with onset 124.7: (110, 104, 27, 16)
Extracted data shape for event with onset 277.6: (110, 104, 27, 16)
Extracted data shape for event with onset 449.7: (110, 104, 27, 16)
Extracted data shape for event with onset 567.0: (110, 104, 27, 16)
Extracted data shape for event with onset 92.7: (110, 104, 27, 16)
Extracted data shape for event with onset 186.8: (110, 104, 27, 16)
Extracted data shape for event with onset 248.4: (110, 104, 27, 16)
Extracted data shape for event with onset 418.8: (110, 104, 27, 16)
Extracted data shape for event with onset 478.6: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-02/func/sub-02_task-odors_run-01_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 440)
Extracted data shape for event with onset 60.2: (110, 104, 27, 16)
Extracted data shape for event with onset 216.6: (110, 104, 27, 16)
Extracted data shape for event with onset 331.8: (110, 104, 27, 16)
Extracted data shape for event with onset 361.1: (110, 104, 27, 16)
Extracted data shape for event with onset 510.0: (110, 104, 27, 16)
Extracted data shape for event with onset 25.8: (110, 104, 27, 16)
Extracted data shape for event with onset 156.2: (110, 104, 27, 16)
Extracted data shape for event with onset 306.0: (110, 104, 27, 16)
Extracted data shape for event with onset 388.8: (110, 104, 27, 16)
Extracted data shape for event with onset 540.5: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-02/func/sub-02_task-odors_run-02_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 440)
Extracted data shape for event with onset 58.4: (110, 104, 27, 16)
Extracted data shape for event with onset 183.5: (110, 104, 27, 16)
Extracted data shape for event with onset 325.7: (110, 104, 27, 16)
Extracted data shape for event with onset 478.2: (110, 104, 27, 16)
Extracted data shape for event with onset 505.6: (110, 104, 27, 16)
Extracted data shape for event with onset 4.0: (110, 104, 27, 16)
Extracted data shape for event with onset 30.1: (110, 104, 27, 16)
Extracted data shape for event with onset 238.3: (110, 104, 27, 16)
Extracted data shape for event with onset 358.6: (110, 104, 27, 16)
Extracted data shape for event with onset 419.8: (110, 104, 27, 16)
Extracted data shape for event with onset 535.2: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-02/func/sub-02_task-odors_run-02_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 440)
Extracted data shape for event with onset 90.8: (110, 104, 27, 16)
Extracted data shape for event with onset 210.2: (110, 104, 27, 16)
Extracted data shape for event with onset 268.7: (110, 104, 27, 16)
Extracted data shape for event with onset 387.6: (110, 104, 27, 16)
Extracted data shape for event with onset 565.2: (110, 104, 27, 16)
Extracted data shape for event with onset 123.6: (110, 104, 27, 16)
Extracted data shape for event with onset 153.0: (110, 104, 27, 16)
Extracted data shape for event with onset 298.8: (110, 104, 27, 16)
Extracted data shape for event with onset 449.1: (110, 104, 27, 16)
Extracted data shape for event with onset 593.4: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-03/func/sub-03_task-odors_run-02_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 398)
Extracted data shape for event with onset 60.8: (110, 104, 27, 16)
Extracted data shape for event with onset 178.3: (110, 104, 27, 16)
Extracted data shape for event with onset 318.5: (110, 104, 27, 16)
Extracted data shape for event with onset 463.2: (110, 104, 27, 16)
Extracted data shape for event with onset 490.0: (110, 104, 27, 16)
Extracted data shape for event with onset 3.0: (110, 104, 27, 16)
Extracted data shape for event with onset 31.3: (110, 104, 27, 16)
Extracted data shape for event with onset 230.7: (110, 104, 27, 16)
Extracted data shape for event with onset 350.0: (110, 104, 27, 16)
Extracted data shape for event with onset 409.7: (110, 104, 27, 16)
Extracted data shape for event with onset 520.0: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-03/func/sub-03_task-odors_run-02_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 398)
Extracted data shape for event with onset 90.7: (110, 104, 27, 16)
Extracted data shape for event with onset 205.1: (110, 104, 27, 16)
Extracted data shape for event with onset 260.1: (110, 104, 27, 16)
Extracted data shape for event with onset 377.5: (110, 104, 27, 16)
Extracted data shape for event with onset 548.6: (110, 104, 27, 16)
Extracted data shape for event with onset 119.8: (110, 104, 27, 16)
Extracted data shape for event with onset 149.8: (110, 104, 27, 16)
Extracted data shape for event with onset 289.3: (110, 104, 27, 16)
Extracted data shape for event with onset 436.7: (110, 104, 27, 16)
Skipping event with invalid DICOM volume range: Start = 385, End = 401, Total Volumes = 398
Loaded NIfTI file: ds002185-download/sub-03/func/sub-03_task-odors_run-01_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 404)
Extracted data shape for event with onset 38.7: (110, 104, 27, 16)
Extracted data shape for event with onset 69.0: (110, 104, 27, 16)
Extracted data shape for event with onset 100.9: (110, 104, 27, 16)
Extracted data shape for event with onset 128.8: (110, 104, 27, 16)
Extracted data shape for event with onset 159.4: (110, 104, 27, 16)
Extracted data shape for event with onset 11.4: (110, 104, 27, 16)
Extracted data shape for event with onset 244.8: (110, 104, 27, 16)
Extracted data shape for event with onset 272.5: (110, 104, 27, 16)
Extracted data shape for event with onset 469.9: (110, 104, 27, 16)
Extracted data shape for event with onset 527.6: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-03/func/sub-03_task-odors_run-01_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 404)
Extracted data shape for event with onset 330.6: (110, 104, 27, 16)
Extracted data shape for event with onset 358.7: (110, 104, 27, 16)
Extracted data shape for event with onset 383.8: (110, 104, 27, 16)
Extracted data shape for event with onset 409.5: (110, 104, 27, 16)
Extracted data shape for event with onset 441.3: (110, 104, 27, 16)
Extracted data shape for event with onset 189.0: (110, 104, 27, 16)
Extracted data shape for event with onset 216.7: (110, 104, 27, 16)
Extracted data shape for event with onset 303.4: (110, 104, 27, 16)
Extracted data shape for event with onset 497.4: (110, 104, 27, 16)
Extracted data shape for event with onset 554.3: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-04/func/sub-04_task-odors_run-01_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 440)
Extracted data shape for event with onset 15.1: (110, 104, 27, 16)
Extracted data shape for event with onset 135.6: (110, 104, 27, 16)
Extracted data shape for event with onset 285.4: (110, 104, 27, 16)
Extracted data shape for event with onset 471.0: (110, 104, 27, 16)
Extracted data shape for event with onset 583.6: (110, 104, 27, 16)
Extracted data shape for event with onset 105.8: (110, 104, 27, 16)
Extracted data shape for event with onset 199.9: (110, 104, 27, 16)
Extracted data shape for event with onset 256.9: (110, 104, 27, 16)
Extracted data shape for event with onset 434.9: (110, 104, 27, 16)
Extracted data shape for event with onset 493.4: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-04/func/sub-04_task-odors_run-01_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 440)
Extracted data shape for event with onset 74.8: (110, 104, 27, 16)
Extracted data shape for event with onset 226.8: (110, 104, 27, 16)
Extracted data shape for event with onset 343.6: (110, 104, 27, 16)
Extracted data shape for event with onset 376.2: (110, 104, 27, 16)
Extracted data shape for event with onset 523.2: (110, 104, 27, 16)
Extracted data shape for event with onset 41.0: (110, 104, 27, 16)
Extracted data shape for event with onset 167.2: (110, 104, 27, 16)
Extracted data shape for event with onset 318.0: (110, 104, 27, 16)
Extracted data shape for event with onset 405.6: (110, 104, 27, 16)
Extracted data shape for event with onset 554.2: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-04/func/sub-04_task-odors_run-02_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 422)
Extracted data shape for event with onset 60.0: (110, 104, 27, 16)
Extracted data shape for event with onset 183.6: (110, 104, 27, 16)
Extracted data shape for event with onset 333.5: (110, 104, 27, 16)
Extracted data shape for event with onset 484.7: (110, 104, 27, 16)
Extracted data shape for event with onset 514.7: (110, 104, 27, 16)
Extracted data shape for event with onset 2.1: (110, 104, 27, 16)
Extracted data shape for event with onset 29.2: (110, 104, 27, 16)
Extracted data shape for event with onset 244.5: (110, 104, 27, 16)
Extracted data shape for event with onset 362.8: (110, 104, 27, 16)
Extracted data shape for event with onset 420.7: (110, 104, 27, 16)
Extracted data shape for event with onset 545.3: (110, 104, 27, 16)
Loaded NIfTI file: ds002185-download/sub-04/func/sub-04_task-odors_run-02_bold_preprocessed.nii.gz, Shape: (110, 104, 27, 422)
Extracted data shape for event with onset 92.2: (110, 104, 27, 16)
Extracted data shape for event with onset 214.9: (110, 104, 27, 16)
Extracted data shape for event with onset 272.8: (110, 104, 27, 16)
Extracted data shape for event with onset 389.9: (110, 104, 27, 16)
Extracted data shape for event with onset 576.1: (110, 104, 27, 16)
Extracted data shape for event with onset 121.2: (110, 104, 27, 16)
Extracted data shape for event with onset 152.7: (110, 104, 27, 16)
Extracted data shape for event with onset 304.4: (110, 104, 27, 16)
Extracted data shape for event with onset 453.9: (110, 104, 27, 16)
Extracted data shape for event with onset 608.6: (110, 104, 27, 16)
Total number of positive events: 424
Total number of negative events: 410
In [6]:
# Display the DataFrames
print("Positive Events DataFrame:")
print(positive_combined_df.head())

print("\nNegative Events DataFrame:")
print(negative_combined_df.head())


# Count the number of events per subject in positive_combined_df
positive_event_counts = positive_combined_df['subject'].value_counts()

# Count the number of events per subject in negative_combined_df
negative_event_counts = negative_combined_df['subject'].value_counts()

# Print the znumber of events per subject for positive events
print("Number of positive events per subject:")
for subject, count in positive_event_counts.items():
    print(f"Subject {subject}: {count} positive events")

# Print the number of events per subject for negative events
print("\nNumber of negative events per subject:")
for subject, count in negative_event_counts.items():
    print(f"Subject {subject}: {count} negative events")
Positive Events DataFrame:
  subject run_modality  onset  dicom_start  dicom_end   smell   
0  sub-13       run-02    4.2            3         19  orange  \
1  sub-13       run-02  153.0          102        118  orange   
2  sub-13       run-02  269.7          180        196  orange   
3  sub-13       run-02  383.7          256        272  orange   
4  sub-13       run-02  507.5          338        354  orange   

                                                data  
0  [[[[0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. ...  
1  [[[[0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. ...  
2  [[[[0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. ...  
3  [[[[0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. ...  
4  [[[[0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. ...  

Negative Events DataFrame:
  subject run_modality  onset  dicom_start  dicom_end          smell   
0  sub-13       run-02   94.7           63         79  smelly-cheese  \
1  sub-13       run-02  181.7          121        137  smelly-cheese   
2  sub-13       run-02  241.7          161        177  smelly-cheese   
3  sub-13       run-02  446.3          298        314  smelly-cheese   
4  sub-13       run-02  568.4          379        395  smelly-cheese   

                                                data  
0  [[[[0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. ...  
1  [[[[0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. ...  
2  [[[[0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. ...  
3  [[[[0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. ...  
4  [[[[0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. ...  
Number of positive events per subject:
Subject sub-16: 23 positive events
Subject sub-12: 22 positive events
Subject sub-17: 21 positive events
Subject sub-10: 21 positive events
Subject sub-03: 21 positive events
Subject sub-05: 21 positive events
Subject sub-11: 21 positive events
Subject sub-18: 21 positive events
Subject sub-20: 21 positive events
Subject sub-19: 21 positive events
Subject sub-04: 21 positive events
Subject sub-14: 21 positive events
Subject sub-07: 21 positive events
Subject sub-06: 21 positive events
Subject sub-01: 21 positive events
Subject sub-08: 21 positive events
Subject sub-02: 20 positive events
Subject sub-13: 20 positive events
Subject sub-15: 19 positive events
Subject sub-09: 18 positive events
Subject sub-22: 8 positive events

Number of negative events per subject:
Subject sub-16: 23 negative events
Subject sub-12: 22 negative events
Subject sub-13: 20 negative events
Subject sub-14: 20 negative events
Subject sub-02: 20 negative events
Subject sub-11: 20 negative events
Subject sub-18: 20 negative events
Subject sub-20: 20 negative events
Subject sub-19: 20 negative events
Subject sub-10: 20 negative events
Subject sub-17: 20 negative events
Subject sub-09: 20 negative events
Subject sub-07: 20 negative events
Subject sub-06: 20 negative events
Subject sub-01: 20 negative events
Subject sub-08: 20 negative events
Subject sub-15: 20 negative events
Subject sub-04: 20 negative events
Subject sub-05: 19 negative events
Subject sub-03: 19 negative events
Subject sub-22: 7 negative events
In [8]:
# Print the columns of the DataFrames to confirm
print("Positive DataFrame columns:", positive_combined_df.columns)
print("Negative DataFrame columns:", negative_combined_df.columns)

# Filter the DataFrames based on subject and run_modality
positive_filtered_df = positive_combined_df[(positive_combined_df['subject'] == 'sub-01') & (positive_combined_df['run_modality'] == 'run-01')]
negative_filtered_df = negative_combined_df[(negative_combined_df['subject'] == 'sub-02') & (negative_combined_df['run_modality'] == 'run-01')]

# Check if the filtered DataFrames are not empty and access the first row
if not positive_filtered_df.empty and not negative_filtered_df.empty:
    # Get the data for the first positive and negative events
    positive_data = positive_filtered_df['data'].iloc[0]
    negative_data = negative_filtered_df['data'].iloc[0]

# Define the subject and run
subject = 'sub-01'
run = 'run-01'

# Define the NIfTI file path based on subject and run
nifti_file = f'ds002185-download/{subject}/func/{subject}_task-odors_{run}_bold.nii.gz'

# Check if the file exists
if os.path.exists(nifti_file):
    # Load the NIfTI file
    img = nib.load(nifti_file)
    
    # Extract the affine transformation matrix
    affine = img.affine

# Convert the extracted data to NIfTI images if needed
positive_img = nib.Nifti1Image(positive_data, affine)
negative_img = nib.Nifti1Image(negative_data, affine)

# Compute the mean image using nilearn
mean_positive_img = mean_img(positive_img)
mean_negative_img = mean_img(negative_img)

# View the mean image for an example negative
print("Viewing mean image for the selected negative event")
plotting.view_img(mean_negative_img, threshold=None, title='Mean Image for Selected Negative Event - Subject 01')
Positive DataFrame columns: Index(['subject', 'run_modality', 'onset', 'dicom_start', 'dicom_end', 'smell',
       'data'],
      dtype='object')
Negative DataFrame columns: Index(['subject', 'run_modality', 'onset', 'dicom_start', 'dicom_end', 'smell',
       'data'],
      dtype='object')
Viewing mean image for the selected negative event
/usr/local/lib/python3.11/site-packages/numpy/core/fromnumeric.py:758: UserWarning: Warning: 'partition' will ignore the 'mask' of the MaskedArray.
  a.partition(kth, axis=axis, kind=kind, order=order)
Out[8]:
In [9]:
# View the mean image for an example positive
print("Viewing mean image for the selected positive event")
plotting.view_img(mean_positive_img, threshold=None, title='Mean Image for Selected Positive Event - Subject 01')
Viewing mean image for the selected positive event
/usr/local/lib/python3.11/site-packages/numpy/core/fromnumeric.py:758: UserWarning: Warning: 'partition' will ignore the 'mask' of the MaskedArray.
  a.partition(kth, axis=axis, kind=kind, order=order)
Out[9]:
In [13]:
events_df = pd.read_csv('ds002185-download/sub-05/func/sub-05_task-odors_run-02_events.tsv', delimiter='\t')
#The time variable in the matrix refers to dicom volumes, and are found using the MRI repition time or TR of 1.5s
tr = 1.5
events_df['dicom_volume'] = (events_df['onset'] / tr).round().astype(int)
events_df.sort_values(by='onset')
Out[13]:
onset duration trial_type response dicom_volume
10 3.5 1.2 banana 2 2
11 32.3 1.4 banana 1 22
0 61.3 1.8 orange 4 41
5 89.8 1.6 smelly-cheese 1 60
16 121.9 1.2 asafetida 1 81
17 152.4 2.2 asafetida 1 102
1 180.2 1.2 orange 3 120
6 208.4 2.1 smelly-cheese 2 139
12 237.8 2.5 banana 2 159
7 264.7 2.9 smelly-cheese 2 176
18 294.0 2.5 asafetida 1 196
2 323.7 2.1 orange 4 216
13 353.3 2.7 banana 3 236
8 379.5 2.1 smelly-cheese 2 253
14 410.8 1.3 banana 3 274
19 437.5 1.1 asafetida 1 292
3 464.3 1.2 orange 4 310
4 491.8 1.3 orange 3 328
15 522.4 0.8 banana 2 348
9 551.7 1.6 smelly-cheese 2 368